//
//  MakeCardViewController.h
//  cherryPicker
//
//  Created by Young Soo Yun on 12. 1. 4..
//  Copyright (c) 2012 Happy. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum{
    TAG_DELIMITER = 1,
    TAG_COMPANY,
    TAG_PAYDATE,
    TAG_USEDATE,
    TAG_PRICE,
    TAG_TFCARDNAME,
    TAG_CHECK,
}MakeCardPickerViewTag;

typedef enum{
    CREATE_CARD = 0,
    MODIFY_CARD,
}MakeCardType;

@protocol MakeCardVCDelegate <NSObject>

- (void)MakeCardOKClick;
- (void)MakeCardCancelClick;
- (void)MakeCardPickerView:(NSString*)labText
                       tag:(NSInteger)tag;

@optional

- (void)MakeCardDelClick;

@end

@interface MakeCardViewController : UIViewController<
UITextFieldDelegate
>{
    IBOutlet UITextField* _tfCardName;
    IBOutlet UILabel* _labTitle;
    IBOutlet UILabel* _labDelimiter;
    IBOutlet UILabel* _labCompany;
    IBOutlet UILabel* _labPayDate;
    IBOutlet UILabel* _labUseDate;
    IBOutlet UILabel* _labPrice;
    
    IBOutlet UIButton* _btnCredit;
    IBOutlet UIButton* _btnCheck;
    IBOutlet UIButton* _btnDel;
    
    IBOutlet UIView* _dayView;
    IBOutlet UIView* _unmodifyView;
    
    id<MakeCardVCDelegate> _delegate;
    
    BOOL _isModify;
    NSInteger _cardType;
}

@property (nonatomic, assign) id<MakeCardVCDelegate> _delegate;

- (void)initType:(MakeCardType)type;
- (void)setLabel:(NSString *)labText
             tag:(NSInteger)tag;
- (IBAction)onOK;
- (IBAction)onCancel;
- (IBAction)onPickerView:(id)sender;
- (IBAction)onSelectCardType:(id)sender;
- (IBAction)onCardDel;

@end
